<%= form_for([@project, @workpackage, @task, @processor]) do |f| %>
  <% if @processor.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@processor.errors.count, (t :error, :scope => [:helpers])) %></h2>

      <ul>
      <% @processor.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <% if @task.users.size.eql?(@project.users.size) %>
    <i><%= t :no_more_members, :scope => [:helpers, :messages, :processors] %></i>
  <% else %>
    <div class="field">
      <%= f.label t :user_id, :scope => [:activerecord, :attributes, :processor] %>
      <% if @task.users.empty? %>
        <%= collection_select(:processor, :user_id, User.where("id in (?)", @project.users), :id, :alias) %>
      <% else %>
        <%= collection_select(:processor, :user_id, User.where("id in (?) and id not in (?)", @project.users, @task.users), :id, :alias) %>
      <% end %>
    </div>

    <div class="actions">
      <%= f.submit t :add, :scope => [:helpers, :submit] %>
    </div>
  <% end %>
<% end %>
